package com.ophiux.abstracts;

import java.util.List;

/**
 * @desc: 抽象类测试类
 * @author: hhl
 * @date：2024/2/19 17:26
 */
public class AbstractTest {

    public static void main(String[] args) {

        Pay pay = new AlipayPay();
        if(pay instanceof WechatPay){
            String wechat = pay.pay("wechat");
            System.out.println(wechat);
        }else if(pay instanceof AlipayPay){
            String alipay = pay.pay("alipay");
            System.out.println(alipay);
        }
     }


}
